<% if @page_link.parent.is_a?(Spree::Store) %>
  <%= turbo_stream.replace spree_dom_id(@page_link) do %>
      <%= render template: 'spree/admin/page_links/edit' %>
    <% end %>
<% else %>
  <% unless params[:sorting_only] %>
    <%= turbo_stream.replace :page_sidebar do %>
      <%= render template: 'spree/admin/page_links/edit' %>
    <% end %>
  <% end %>
  <%= render 'spree/admin/page_links/refresh_theme_preview' %>
<% end %>